package test04.demo00.tx01;

public class MyThread extends Thread {
    private int m;
    private int n;

    private int sum;

    public MyThread(int m, int n) {
        this.m = m;
        this.n = n;
    }

    @Override
    public void run() {
        for (int i = m; i <= n; i++) {
            sum = sum + i;
        }
    }

    public int getSum() {
        return sum;
    }
}
